package com.fanshuai.tree.tree;

import com.fanshuai.tree.Visitor;

public interface ITree {
    void setRoot(int value);
    void addNode(Node node, Node subNode);
    void addNode(Node node, Node subNode, int index) throws IndexOutOfBoundsException;

    void delNode(Node node, int value);
    void delNodeByIndex(Node node, int index) throws IndexOutOfBoundsException;
    void clear();

    void visit(Visitor visitor);
}
